package com._101aiot.test.redis.controller;

import com._101aiot.common.resultutil.CommonResult;
import com._101aiot.redis.core.RedisService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * redis集成模块测试
 */
@Api(value = "redis", tags = "redis测试")
@RestController
@RequestMapping("/redis")
@AllArgsConstructor
public class RedisServiceController {

    private final RedisService redisService;

    @ApiOperation(value = "测试接口")
    @GetMapping("/test")
    @SuppressWarnings("all")
    public CommonResult test() {
        boolean flag = redisService.set("aa", "{'name':'张三'}");
        System.out.println(flag);
        return CommonResult.success();
    }

}
